home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Programmer's Power Pack
/
Delphi Volume 1.iso
/
e_to_l
/
fbuilder
/
delphi
/
demos
/
fbhelpfm.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-09-15
|
2KB
|
70 lines
{ FormulaBuilder }
{ YGB Software, Inc. }
{ Copyright 1995 Clayton Collie }
{ All rights reserved }
{ Simple Notebook based help for FormulaBuilder Demo }
unit Fbhelpfm;
interface
uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, StdCtrls, Tabs,
Buttons, ExtCtrls;
type
THelpDialog = class(TForm)
ButtonPanel: TPanel;
TabSet: TTabSet;
Notebook: TNotebook;
OKBtn: TBitBtn;
CancelBtn: TBitBtn;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
Memo1: TMemo;
Memo2: TMemo;
Memo3: TMemo;
Page1GroupBox: TGroupBox;
Memo5: TMemo;
Memo4: TMemo;
procedure FormCreate(Sender: TObject);
procedure TabSetClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
HelpDialog: THelpDialog;
Procedure DisplayHelp(pageno : byte);
implementation
{$R *.DFM}
Procedure DisplayHelp(pageno : byte);
var helpDlg : THelpDialog;
begin
HelpDlg := THelpDialog.Create(NIL);
helpDlg.Notebook.PageIndex := Pageno;
helpdlg.Tabset.TabIndex := PageNo;
HelpDlg.Showmodal;
helpdlg.free;
end;
procedure THelpDialog.FormCreate(Sender: TObject);
begin
{ make the number of Tabs = number of Pages,
and have the same names }
TabSet.Tabs := Notebook.Pages;
end;
procedure THelpDialog.TabSetClick(Sender: TObject);
begin
{ set visible Page to which Tab was clicked }
Notebook.PageIndex := TabSet.TabIndex;
end;
end.